#include "possion.h"
#include "ui_possion.h"
#include "qfiledialog.h"
Surface_possion::Surface_possion(QWidget* parent) :
    QDialog(parent),
    ui(new Ui::Surface_possion)
{
    ui->setupUi(this);
}

Surface_possion::~Surface_possion()
{
    delete ui;
}

void Surface_possion::on_buttonBox_accepted()
{
    emit sendData(ui->lineEdit->text(), ui->lineEdit_2->text(), ui->lineEdit_3->text(), ui->lineEdit_4->text(), ui->lineEdit_5->text(), ui->lineEdit_6->text(), ui->lineEdit_7->text(), axis);

    this->close();
}

void Surface_possion::on_radioButton_clicked()
{
    if (ui->radioButton->isChecked())
    {
        ui->radioButton_2->setChecked(false);
        ui->radioButton_3->setChecked(false);
        axis = "0";
    }
}

void Surface_possion::on_radioButton_2_clicked()
{
    if (ui->radioButton_2->isChecked())
    {
        ui->radioButton->setChecked(false);
        ui->radioButton_3->setChecked(false);
        axis = "1";
    }
}

void Surface_possion::on_radioButton_3_clicked()
{
    if (ui->radioButton_3->isChecked())
    {
        ui->radioButton_2->setChecked(false);
        ui->radioButton->setChecked(false);
        axis = "2";
    }
}